package cn.cs.client;

import cn.cs.common.Page;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ClientBigUserFallBack;
import cn.cs.fallback.ClientUserClientFallBack;
import cn.cs.pojo.ClientBigUser;
import cn.cs.pojo.ClientUser;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = ClientBigUserFallBack.class)
public interface RestClientBigUserClient {


    @RequestMapping(value = "/getClientBigUserListByMap", method = RequestMethod.POST)
    public List<ClientUser> getClientBigUserListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getClientBigUserCountByMap", method = RequestMethod.POST)
    public Integer getClientBigUserCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addClientBigUser", method = RequestMethod.POST)
    public Integer addClientBigUser(@RequestBody ClientUser clientUser) throws Exception;

    @RequestMapping(value = "/modifyClientBigUser", method = RequestMethod.POST)
    public Integer modifyClientBigUser(@RequestBody ClientUser clientUser) throws Exception;

    @RequestMapping(value = "/deleteClientBigUserById", method = RequestMethod.POST)
    public Integer deleteClientBigUserById(@RequestParam("id") Long id) throws Exception;

    @RequestMapping(value = "/getMaxCode", method = RequestMethod.POST)
    public Integer getMaxCode(@RequestParam("param") String param) throws Exception;

}

